package com.xiaomili.halfsugar.activity;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

import com.xiaomili.halfsugar.R;

public class SplashActivity extends AppCompatActivity {
    private static final long SLEEP_TIME = (long) (1.5 * 1000);

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_splash);
        new Thread(new Runnable() {
            @Override
            public void run() {
                try {
                    Thread.sleep(SLEEP_TIME);
                    MainActivity.toMainactivity(SplashActivity.this);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
        }).start();
    }
}
